/**
 * <pre>
 *     author : XML
 *     e-mail : 946891360@qq.com
 *     time   : 2019/07/04
 *     version:
 *     desc   :
 * </pre>
 */

import React from 'react';
import {TouchableOpacity} from 'react-native';
import Ionicons from 'react-native-vector-icons/Ionicons'

export default class ViewUtil {
    /**
     * 生成返回按钮
     * @param callback
     * @returns {*}
     */
    static getLeftBackButton(callback) {
        return <TouchableOpacity
            style={{padding: 8, paddingLeft: 12}}
            onPress={callback}
        >
            <Ionicons
                name={'ios-arrow-back'}
                size={26}
                style={{color: 'white'}}
            />
        </TouchableOpacity>
    }

    /**
     * 生成分享按钮
     * @param callback
     * @returns {*}
     */
    static getShareButton(callback) {
        return <TouchableOpacity
            underlayColor={'transparent'}
            onPress={callback}
        >
            <Ionicons
                name={'md-share'}
                size={26}
                style={{opacity: 0.9, marginRight: 10, color: 'white'}}
            />
        </TouchableOpacity>
    }
}

